package com.coderknock.jedis.push;

import redis.clients.jedis.Jedis;

/**
 * @author  liu.mou
 *消息发布
 * **/
public class Publisher {
    public void publish(final Jedis jedis) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("开始发布讯息咯:");
                try {
                    Thread.currentThread().sleep(2000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                jedis.publish("D00C003", "oklalllla");
                jedis.publish("hello", "oklalllla");
            }
        }).start();
    }
}
